<?php
/**
 * <https://y.st./>
 * Copyright © 2019 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'Trying to cancel non-existent plans',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<img src="/img/CC_BY-SA_4.0/y.st./weblog/2019/07/11.jpg" alt="Main Street" class="framed-centred-image" width="800" height="480"/>
<section id="diet">
	<h2>Dietary intake</h2>
	<p>
		For breakfast, I had 27 grams of cerail and 52 grams of soy milk.
		I had two 0.36-litre slushies today, but I also biked for about two hours, so I think that balances out at least a little bit.
		Though I had a small breakfast and overall tried to eat very small meals, I did have several meals.
		Pretty much any time I got hungry, I ate a little bit.
		I had a part of my muffuletta four times: 182 grams, 63 grams, 118 grams, and 148 grams.
		Later, I had 274 grams of rice, Italian sausage, and liquid aminos.
	</p>
	<p>
		Now that I&apos;m looking at all those gram values though, I think maybe I ate more than I should have.
	</p>
</section>
<section id="drudgery">
	<h2>Drudgery</h2>
	<p>
		My discussion post for the day:
	</p>
	<blockquote>
		<p>
			Animals that can see, which includes up humans, are only able to get a {$a['2D']} image of the world around them.
			Various techniques are used to interpret that {$a['2D']} data as a {$a['3D']} representation.
			For example, most of us have two eyes, allowing us to get a {$a['2D']} image from two slightly-different places.
			Our brains then analyse the two images for differences that would be consistent with a {$a['3D']} world and use the amount of difference to determine about where objects lie in space.
			because this all happens on the fly, we think we can see {$a['3D']}, but we can&apos;t.
			If we could, we could see objects behind other opaque objects.
		</p>
		<h2>Shading</h2>
		<p>
			Another trick our brains use is look for highlights and shadows.
			We assume light is coming from a single source, so how it is reflected and obscured tells us a lot.
			Even many of our assumptions about single light sources apply when there are multiple light sources, so long as the light doesn&apos;t come from everywhere.
			This is where shading comes in.
			Even without a difference between what our two eyes see, we use shading shading and highlights to determin the shape of an object, and based on the shading and highlights of other objects, the distance.
			To see the effects of shading on making an image appear three dimensional, try looking at a photograph.
			That photograph is perfectly flat, and your brain can easily see that, but it can also easily see the scene it depicts as three dimensional based on teh shading and highlights.
		</p>
		<p>
			Lighting in {$a['3D']} graphics is an abstraction.
			There are no light sources, and light doesn&apos;t bounce off of things, or get absorbed or obscured.
			Instead, &quot;lighting&quot; is used to determine the shading of an object.
			That shading provides a sense of depth, because although the rendered image is still perfectly flat when displayed on our monitors, our brains interpret the shading as shadows, and uses these shadows to determine the shape of the object.
			Depending on what sort of lighting you use in your scene, your objects will appear differently.
			For example, with faceted lighting, each face is given a shade (Autodesk, 2015).
			This allows you to see the faces of the objects.
			Remember that objects are made up of polygons, ans actual smooth sides aren&apos;t possible.
			On the other hand, you could instead use smooth lighting, the object appears smooth even though it isn&apos;t because of the way smooth lighting generates the shading used.
		</p>
		<h2>Bump maps</h2>
		<p>
			Bump maps are a way to add shading to a texture, or more accurately, add shading to the material using the texture.
			They&apos;re greyscale images that are used to determine the shading, which allows fine detail to be added not by adding polygons, but instead using a standard greyscale image in addition to the main texture.
			There&apos;s a notable problem with doing this though.
			Namely, because there aren&apos;t actually any changes to the mesh&apos;s polygons, there&apos;s no actual detail, and viewing the face from a bad angle spoils the illusion of added detail.
			You can see that the details have just been painted onto the face, and that they&apos;re not actually there (Pluralsight, 2014).
			As long as you&apos;re careful with your use of bump maps and pay attention to your camera angles, it should be fine, but it doesn&apos;t seem like a good idea to use them if the user is able to control the camera, as you can&apos;t make sure they&apos;re seen from a good angle.
		</p>
		<p>
			When building and using a bump map, values in your greyscale image that are lighter will make those parts of the model appear to be jutting out, while darker regions of your greyscale image will case parts of your model to be indented (Pluralsight, 2014).
			None of these changes actually affect the shape of the model though.
		</p>
		<h2>Normal maps</h2>
		<p>
			Normal maps also change the way the shading is performed using an image to map out parts of the model to be affected.
			Again, this doesn&apos;t change the shape of the model, and creates a sense of depth and detail without any actually being added to the shape of your objects.
			However, instead of directly adding light and shadow, normal maps are used to orient the normal vectors for the surface of the object (Pluralsight, 2014).
			While bump maps only use a single colour channel (making them greyscale) because they only really make things appear to be moved along one dimension (the one perpendicular to the face), normal maps use three colour channels: red, green, and blue.
			They&apos;re not used for colour though.
			Instead, each channel corresponds to a dimension, so that the direction of the normal vector for each point in the normal map can be set independently of the other points in the normal map.
			Unlike bump maps, this type of map isn&apos;t affected by camera angles, as the normal vectors can be used to determine the shading normally from any angle; they&apos;re not a direct texture modification like bump maps are.
			While normal maps tend to work better, they&apos;re also more difficult to produce in a standard image editor, so special normal-map-editing software is recommended (Pluralsight, 2014).
			Normal maps are also a newer concept, so they aren&apos;t supported on a few platforms such as mobiles just yet.
		</p>
		<div class="APA_references">
			<h3>References:</h3>
			<p>
				Autodesk.
				(2015, December 15).
				<a href="">About Shading, Highlighting and Coloring Faces | AutoCAD 2016 | Autodesk Knowledge Network</a>.
				Retrieved from <code>https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-Core/files/GUID-C865EEE9-DF5E-4BFF-87A7-1E8130F68AC6-htm.html</code>
			</p>
			<p>
				Pluralsight.
				(2014, August 14).
				<a href="https://www.pluralsight.com/blog/film-games/bump-normal-and-displacement-maps">Difference between Displacement, Bump and Normal Maps | Pluralsight</a>.
				Retrieved from <code>https://www.pluralsight.com/blog/film-games/bump-normal-and-displacement-maps</code>
			</p>
		</div>
	</blockquote>
</section>
<section id="religion">
	<h2>Religious study</h2>
	<p>
		The missionaries wrote to me to &quot;cancel on me&quot;, but they still had me on hold from before.
		There was no appointment, so nothing to cancel.
		I guess they sort of assumed we&apos;d meet today, even though they told me they&apos;d be unable to make such plans for a while.
	</p>
	<p>
		Anyway, they want me to read the Pearl of Great Price this week.
		Will I do it?
		I&apos;m not sure.
		I think this week&apos;s going to be a bit lighter than usual on the coursework front though, so I might have time.
		They also scheduled a meeting for next Thursday, so this time, we actually <strong>*do*</strong> have an appointment.
	</p>
</section>
<section id="Minetest">
	<h2>Minetest</h2>
	<img src="/img/CC_BY-SA_3.0/minetest.net./weblog/2019/07/11.png" alt="So much lava" class="framed-centred-image" width="1024" height="600"/>
	<p>
		My mine broke through to a lava cave.
		Because my mineshaft is two metres by two metres instead of one by one, I didn&apos;t fall into it, as I was able to see the lava before I had nothing to stand on, but the lava was still in my way.
		I led some water down my mineshaft from a nearby lake cave to extinguish it, but because of that stupid lava update a while back, lava hardens into obsidian now, which bizarrely is an incredibly tough material to get through.
		I mean, obsidian is the name of a volcanic glass in the real world.
		Why does Minetest use it as the name of a bizarrely-hard rock?
		But anyway, stone tools weren&apos;t going to make any headway.
		I could bend the shaft around the lava pool, but then I&apos;d lose the daylight I&apos;ve got from simply digging straight down.
		It wouldn&apos;t be worth it.
		I either needed to start a new mineshaft and risk losing my progress on that one too due to another lava pool or break my way through this hardest of stones.
		Obviously, I decided to break through the stone.
		It was the only way to be sure I wouldn&apos;t lose the next mineshaft as well.
		If you let the lava stop you, it&apos;s probably going to stop you before you can get deep enough just about every time.
		I was only able to do this due to finding copper and tin today though.
		Without them, I couldn&apos;t build tools capable of handling the job.
		The alternative would be diamond tools, but I haven&apos;t found a single diamond yet.
	</p>
	<p>
		What I was mainly looking for underground today was dirt.
		I don&apos;t like taking it from the surface world and leaving places with bare stone, so I tend to dig it out of my mines.
		I couldn&apos;t find any though.
		At all.
		Finally, I gave up and checked the source code.
		Had the dirt blob ores been removed?
		No, it turns out that they hadn&apos;t, but they&apos;re limited to spawning at <var>y</var> equals <code>-32</code> and above.
		I was way too deep to find any.
		Is this new?
		Didn&apos;t dirt used to spawn all through the underground?
		I really don&apos;t recall for sure.
		I didn&apos;t think it worth the time to mine up near the surface though, as I also need mese if I&apos;m to leave this island at any point, and mese doesn&apos;t spawn so close to the surface.
		I decided to just cover the remainder of my island with silver sand instead.
		It&apos;s not quite the look I was hoping for, but it&apos;ll do.
		I don&apos;t have enough dirt and silver sand combined to cover the island just yet, but I&apos;ve mostly covered it, and I&apos;ve found silver sand underground a few times in this world, so I know this version of the game does have it down there.
	</p>
</section>
END
);
